namespace Digitalmes.Common.Workflows;

/// <summary>
/// 工作流步骤的状态数据
/// </summary>
public record WorkflowStepState
{
    public string? Id { get; init; }

    public string Name { get; init; }

    public string Version { get; init; }

    public WorkflowStepState(string name, string version, string? id = null)
    {
        Id = id;
        Name = name;
        Version = version;
    }
}

/// <summary>
/// 工作流步骤的状态数据。
/// </summary>
/// <typeparam name="TState"></typeparam>
public record WorkflowStepState<TState> : WorkflowStepState where TState : class, new()
{
    public TState? State { get; init; }

    public WorkflowStepState(string name, string version, string? id = null) : base(name, version, id)
    {
    }
}
